Copy Generic Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Copies all of the items from the collection source to the list dest, starting at the index destIndex. If necessary, the size of the destination list is expanded.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public static void Copy<T>(
	IEnumerable<T> source,
	IList<T> dest,
	int destIndex
)
Visual Basic (Declaration)
Public Shared Sub Copy(Of T) ( _
	source As IEnumerable(Of T), _
	dest As IList(Of T), _
	destIndex As Integer _
)
Visual C++
public:
generic<typename T>
static void Copy (
	IEnumerable<T>^ source, 
	IList<T>^ dest, 
	int destIndex
)

Parameters

source
IEnumerable<(Of <T>)>
The collection that provide the source items.
dest
IList<(Of <T>)>
The list to store the items into.
destIndex
Int32
The index to begin copying items to.

Type Parameters

T

Exceptions

ExceptionCondition
System..::ArgumentOutOfRangeExceptiondestIndex is negative or greater than dest.Count.
System..::ArgumentNullExceptionsource or dest is null.

See Also